package cn.hdu.liang.javafx;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
import javafx.stage.Stage;

public class FirstApp extends Application {
    @Override
    public void start(Stage primaryStage) throws Exception {
        Label label = new Label("欢迎");
        StackPane root = new StackPane();
        root.getChildren().add(label);

        Scene scene = new Scene(root, 400, 200);
        scene.setFill(Color.BEIGE);

        primaryStage.setTitle("第一个FX程序");
        primaryStage.setScene(scene);
        primaryStage.show();
    }
}
